package com.mostromas.ess.entities;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.mostromas.ess.util.enums.CardNumberEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * 软件卡密
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="ProjectCardNumber对象", description="软件卡密")
public class ProjectCardNumber implements Serializable {
    private static final long serialVersionUID = 2996202534640994198L;
    /**
     * 主键，分布式ID
     */
    @ApiModelProperty(value = "ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "分类")
    private CardNumberEnum type;

    @ApiModelProperty(value = "卡号")
    private String cardNumber;

    @ApiModelProperty(value = "软件ID")
    private String projectId;

    @ApiModelProperty(value = "有效天数")
    private int days;

    @ApiModelProperty(value = "是否已使用 false未使用 true已使用")
    private boolean state = false;

    @ApiModelProperty(value = "使用的用户名")
    private String username;

    @ApiModelProperty(value = "使用日期")
    private Date useTime;
}
